package com.zhongya.example.fragment.advanced

import com.zhongya.example.R
import com.zhongya.example.databinding.ExampleFragmentJjzg2Binding
import com.zhongya666.library.base.fragment.BaseDbFragment
import com.zhongya666.library.ext.initClose
import com.zhongya666.library.view.nav


class JJZG2Fragment :
    BaseDbFragment<ExampleFragmentJjzg2Binding>(R.layout.example_fragment_jjzg2) {


    override fun initView() {
        mDatabind.include.toolbar.initClose("未命名") {
            nav().popBackStack()
        }

        mDatabind.run {
            btnSure.setOnClickListener {
                val text = et.text.toString().trim()
                if (text == "a"){
                    tl.isErrorEnabled = true
                    tl.error = "输入错误"
                }else{
                    tl.isErrorEnabled = false
                }
            }
        }


    }

    override fun createObserver() {

    }

    override fun lazyLoadData() {

    }



}